﻿
var allCity="/area/query/selfCity.do";					 //查询所有城市接口

//加载地市下拉列表	
function loadCombox(){
	$.getJSON(allCity, function (json) {
		$('#citySelect').combobox({    
			data:json.data,
		    valueField:'id',    
		    textField:'name',
		    onLoadSuccess: function () {
				var a = $('#citySelect').combobox('getData');
				if (a.length > 0) {
					$('#citySelect').combobox('select', a[0].id);
				}
			},
			onSelect: function(rec){
	            query(2);
	        }
		});  
	}, "json");
}

$(function(){
	loadGRID();
	var iHeight = document.documentElement.clientHeight;
	var iWidth = document.documentElement.offsetWidth;
	$("#chart_city").width(iWidth*0.5-50+'px');
	$("#chart_city").height(iHeight-140+'px');
	loadYear(2);
	loadCombox();
	loadForm(2);
});
